import pyecharts
from pyecharts.options import TitleOpts, LegendOpts, ToolboxOpts, VisualMapOpts
from pyecharts.charts import Line
from pyecharts.render import make_snapshot, render
# 创建一个折线图对象
line = Line()
line.add_xaxis(["中国", "美国", "英国"])
line.add_yaxis("GDP", [30, 20, 10])
line.render()

line.set_global_opts(
    title_opts= TitleOpts(title="GDP展示", pos_left="center", pos_bottom="1%"),
    toolbox_opts=ToolboxOpts(is_show=True),
    visualmap_opts=VisualMapOpts(is_show=True),
)
line.render()